<template>
	<div class="g-select01 g-select03">
		<el-dropdown
    	@command="selectFuc"
		>
		  <div class="el-dropdown-link">
		    {{ select01 }} <slot></slot> <i class="icon-transfer"></i>
		  </div>
		  <el-dropdown-menu slot="dropdown"
		  >
		    <el-dropdown-item
		    	v-for="(item,index) of select"
		    	:key="index"
		    	:command="item"
		    >{{ item }}</el-dropdown-item>
		  </el-dropdown-menu>
		</el-dropdown>
	</div>
</template>

<script>
	export default {
		name: "gSelect03",
		data() {
			return {
				select01: this.select.length ? this.select[0] : ""
			}
		},
		props: {
			select: {
				type: Array,
				default: function() {
					return [];
				},
				required: true
			}
		},
		methods: {
			selectFuc(command){
				this.select01 = command;
				this.$emit('command',command);
			}
		}
	}
</script>
